<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<link th:replace="fragments/dependency :: edit-css">

<title>优铺Admin</title>
</head>

<body>
	<div class="right_col" style="background: #F7F7F7">
		<div class="row">
			<div class="col-md-12 col-sm-12 col-xs-12">
				<form class="form-horizontal form-label-left" id="dateForm">
					<div class="x_content">
						<div class="form-group">
							<label class="control-label col-md-1"> 区域 </label>
							<div class="col-md-2 col-sm-2 col-xs-12" style="line-height: 34px;">
								<div th:text="${paiDianRecord.area.name}"></div>
							</div>
							<label class="control-label col-md-1"> 商圈 </label>
							<div class="col-md-2 col-sm-2 col-xs-12" style="line-height: 34px;">
								<span th:text="${paiDianRecord.businessArea.name}"></span>
							</div>
							<label class="control-label col-md-1"> 环线 </label>
							<div class="col-md-2 col-sm-2 col-xs-12" style="line-height: 34px;">
								<span th:text="${paiDianRecord.huanXian}"></span>
							</div>
							<label class="control-label col-md-1"> 坐标 </label>
							<div class="col-md-2 col-sm-2 col-xs-12" style="line-height: 34px;">
								<span th:text="${paiDianRecord.locationX + ' , ' + paiDianRecord.locationY}"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-md-1"> 提交日期 </label>
							<div class="col-md-2 col-sm-2 col-xs-12" style="line-height: 34px;">
								<span th:text="${#dates.format(paiDianRecord.updateTime, 'yyyy/MM/dd')}"></span>
							</div>
							<label class="control-label col-md-1"> 微信ID </label>
							<div class="col-md-2 col-sm-2 col-xs-12" style="line-height: 34px;">
								<span th:text="${paiDianRecord.wechatId}"></span>
							</div>
							<label class="control-label col-md-1"> 店主电话 </label>
							<div class="col-md-2 col-sm-2 col-xs-12" style="line-height: 34px;">
								<span th:text="${paiDianRecord.phone}"></span>
							</div>
						</div>

						<div class="form-group">
							<label class="control-label col-md-1"> 商铺图片 </label>
							<div style="width: 184px; float: left;">
								<img th:src="${paiDianRecord.img0}" width="177">
							</div>
							<div style="width: 184px; float: left;">
								<img th:src="${paiDianRecord.img1}" width="177">
							</div>
							<div style="width: 184px; float: left;">
								<img th:src="${paiDianRecord.img2}" width="177">
							</div>
							<div style="width: 184px; float: left;">
								<img th:src="${paiDianRecord.img4}" width="177">
							</div>
							<div style="width: 184px; float: left;">
								<img th:src="${paiDianRecord.img5}" width="177">
							</div>
							<div style="width: 184px; float: left;">
								<img th:src="${paiDianRecord.img6}" width="177">
							</div>
							<div style="width: 184px; float: left;">
								<img th:src="${paiDianRecord.img7}" width="177">
							</div>
						</div>

						<div class="form-group">
							<label class="control-label col-md-1"> 拒绝原因 </label>
							<div style="width: 730px; float: left;">
								<textarea id="reason" style="width: 730px; height: 77px;" placeholder="如“拒绝通过”请填写拒绝原因，上限20个字"></textarea>
							</div>
						</div>

						<div class="form-group" style="margin: 0px auto; width: 450px;">
							<div class="col-md-6 col-md-offset-3">
								<button id="tongguo" class="btn btn-primary" style="width: 200px;" type="button">通过</button>
							</div>
							<div class="col-md-6 col-md-offset-3">
								<button id="jujue" class="btn btn-primary" style="width: 200px;" type="button">拒绝</button>
							</div>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>

	<div th:replace="fragments/dependency :: edit-js"></div>
	<script type="text/javascript" th:inline="javascript">
		$("#tongguo").click(function() {
			$.post('/paiDianRecord/update?id=' + [[${param.id[0]}]] + '&flag=1', function(data) {
				adminLayer.alert({
					content : '审核成功',
					yes : function() {window.parent.location.reload();}
				});
			});
		});
		$("#jujue").click(function() {
			var reason = $("#reason").val();
			if(reason && reason.length <= 20) {
				$.post('/paiDianRecord/update?id=' + [[${param.id[0]}]] + '&flag=0', {reason: reason}, function(data) {
					adminLayer.alert({
						content : '审核成功',
						yes : function() {window.parent.location.reload();}
					});
				});
			} else {
				layer.msg("请输入正确的拒绝理由")
			}
		})
	</script>
	<script src="/dic/area.js?v20171010"></script>
	<script type="text/javascript" charset="utf-8" src="/vendors/ueditor/ueditor.config.js"></script>
	<script type="text/javascript" charset="utf-8" src="/vendors/ueditor/ueditor.all.min.js"></script>
	<script type="text/javascript" charset="utf-8" src="/vendors/ueditor/lang/zh-cn/zh-cn.js"></script>
	<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=47vEMrUPXkGWul3APowwKZ1w"></script>
	<script type="text/javascript">
		var shopTagIds = []
		var shopBusinessTypeIds = []
		var manageBusinessTypeIds = []
		var fitBusinessTypeIds = []
		var shopSupportingIds = []
		var leftNearBusinessTypeIds = []
		var rightNearBusinessTypeIds = []
	</script>
	<script type="text/javascript" th:each="shopTag : ${entity.shopTags}">
		shopTagIds.push([[${shopTag.id}]])
	</script>
	<script type="text/javascript" th:each="shopBusinessType : ${entity.manageBusinessTypes}">
		manageBusinessTypeIds.push([[${shopBusinessType.id}]])
	</script>
	<script type="text/javascript" th:each="shopBusinessType : ${entity.fitBusinessTypes}">
		fitBusinessTypeIds.push([[${shopBusinessType.id}]])
	</script>
	<script type="text/javascript" th:each="shopSupporting : ${entity.shopSupportings}">
		shopSupportingIds.push([[${shopSupporting.id}]])
	</script>
	<script type="text/javascript" th:each="shopBusinessType : ${entity.leftNearBusinessTypes}">
		leftNearBusinessTypeIds.push([[${shopBusinessType.id}]])
	</script>
	<script type="text/javascript" th:each="shopBusinessType : ${entity.rightNearBusinessTypes}">
		rightNearBusinessTypeIds.push([[${shopBusinessType.id}]])
	</script>
	<script type="text/javascript" th:inline="javascript">
		$(function() {
			$("#mask").remove();
		});
		var toolbars = [ 'anchor', //锚点
		'undo', //撤销
		'redo', //重做
		'bold', //加粗
		'snapscreen', //截图
		'italic', //斜体
		'underline', //下划线
		'strikethrough', //删除线
		'formatmatch', //格式刷
		'source', //源代码
		'pasteplain', //纯文本粘贴模式
		'preview', //预览
		'removeformat', //清除格式
		'unlink', //取消链接
		'fontsize', //字号
		'insertimage', //多图上传
		'link', //超链接
		'emotion', //表情
		'spechars', //特殊字符
		'justifyleft', //居左对齐
		'justifyright', //居右对齐
		'justifycenter', //居中对齐
		'justifyjustify', //两端对齐
		'forecolor', //字体颜色
		'backcolor', //背景色
		'fullscreen' //全屏
		]

		function locate() {
			var area = $('input[name="address"]').val()
			area = area ? area : $('select[name="province"]').text()
			adminLayer.ifream({
				title : '获取坐标',
				content : '/baiduMap/locate?area=' + area,
				area : [ '75%', '75%' ]
			})
		}

		function locateCallback(x, y) {
			$('input[name="positionX"]').val(x)
			$('input[name="positionY"]').val(y)
		}

		$(function() {
			var uploader = WebUploader.create({
				// 选完文件后，是否自动上传。
				auto : true,
				// swf文件路径
				swf : '/js/Uploader.swf',
				// 文件接收服务端。
				server : 'https://static.youpuchina.com/ueditor/jsp/controller.jsp?action=uploadimage&watermark=true',
				// 选择文件的按钮。可选。
				// 内部根据当前运行是创建，可能是input元素，也可能是flash.
				pick : '#filePicker',
				// 只允许选择图片文件。
				accept : {
					title : 'Images',
					extensions : 'jpg',
					mimeTypes : 'image/*'
				},
				fileSingleSizeLimit: 300 * 1024
			});
			
			uploader.onError = function(code) {
				if (code == 'Q_TYPE_DENIED') {
					layer.msg('图片类型错误', {
						icon : 2
					});
				} else if (code == 'F_EXCEED_SIZE') {
					layer.msg('图片的大小超过限制', {
						icon : 2
					});
				}
		    };
		    
			uploader.on('fileQueued', function(file) {
				var $li = $('<div id="' + file.id + '" class="file-item thumbnail">'+'<button type="button" class="closeImg" style="position: absolute; bottom: 8px;" i="">删除</button>' + '<img>' + '<div class="info">' + file.name + '</div>' + '</div>'), $img = $li.find('img');
				
				// $list为容器jQuery实例
				$('#fileList').append($li);
				
				// 创建缩略图
				// 如果为非图片文件，可以不用调用此方法。
				// thumbnailWidth x thumbnailHeight 为 100 x 100
				uploader.makeThumb(file, function(error, src) {
					if (error) {
						$img.replaceWith('<span>不能预览</span>');
						return;
					}
					
					$img.attr('src', src);
				}, 100, 100);
			});
			
			// 文件上传过程中创建进度条实时显示。
			uploader.on('uploadProgress', function(file, percentage) {
				var $li = $('#' + file.id), $percent = $li.find('.progress span');
				
				// 避免重复创建
				if (!$percent.length) {
					$percent = $('<p class="progress"><span></span></p>').appendTo($li).find('span');
				}
				
				$percent.css('width', percentage * 100 + '%');
			});
			
			// 文件上传成功，给item添加成功class, 用样式标记上传成功。
			uploader.on('uploadSuccess', function(file, result) {
				$('#' + file.id).addClass('upload-state-done');
				$('#' + file.id).find(".closeImg").attr('i',result.url);
				console.log(result)
				var imgs = $('input[name="imgs"]').val()
				if (imgs) {
					$('input[name="imgs"]').val($('input[name="imgs"]').val() + ',' + result.url)
				} else {
					$('input[name="imgs"]').val(result.url)
				}
			});
			
			// 文件上传失败，显示上传出错。
			uploader.on('uploadError', function(file) {
				var $li = $('#' + file.id), $error = $li.find('div.error');
				// 避免重复创建
				if (!$error.length) {
					$error = $('<div class="error"></div>').appendTo($li);
				}
				$error.text('上传失败');
			});
			
			// 完成上传完了，成功或者失败，先删除进度条。
			uploader.on('uploadComplete', function(file) {
				$('#' + file.id).find('.progress').remove();
			});
			
			
			var area=[[${entity.area?.id}]]
			var city=[[${entity.city?.id}]]
			renderProvinceOptions('provinceOptions')
			renderCityOptions('cityOptions',city)
			renderAreaOptions('areaOptions',area,city)
			$("#cityOptions").change(function(){
				var cityId = $("#cityOptions").val();
				$("#areaOptions").empty();
				if(cityId==''){
					$("#areaOptions").append('<option value="">请选择</option>')
				}else{
					renderAreaOptions('areaOptions','',cityId)
				}
			})
	
			$('select[name="type"]').val([[${entity.type}]])
			$('select[name="shopStatus"]').val([[${entity.shopStatus}]])
			$('select[name="publicType"]').val([[${entity.publicType}]])
			$('select[name="ownerType"]').val([[${entity.ownerType}]])
			
			var shopTransferFee="[[${entity.transferFee}]]";
			if(shopTransferFee == "-1.0" || shopTransferFee == "-2.0") {
				$('input[name="transferFeeCheck"]').each(function(index, node) {
					if($(node).val() + ".0" == shopTransferFee) {
						$(node).iCheck('check');
					}
				});
			}
			$.each(shopTagIds, function(index, shopTagId) {
				$('input[data-rel="shopTag' + shopTagId + '"]').iCheck('check');
			})
			
			$('select[name="floorType"]').val([[${entity.floorType}]])
			
			$('select[name="manage"]').val([[${entity.manage}]])
			
			$.each(manageBusinessTypeIds, function(index, manageBusinessTypeId) {
				$('input[data-rel="manageBusinessType' + manageBusinessTypeId + '"]').iCheck('check');
			})
			
			$.each(fitBusinessTypeIds, function(index, fitBusinessTypeId) {
				$('input[data-rel="fitBusinessType' + fitBusinessTypeId + '"]').iCheck('check');
			})
			
			$.each(shopSupportingIds, function(index, shopSupportingId) {
				$('input[data-rel="shopSupporting' + shopSupportingId + '"]').iCheck('check');
			})
			
			$.each(leftNearBusinessTypeIds, function(index, leftNearBusinessTypeId) {
				$('input[data-rel="leftNearBusinessType' + leftNearBusinessTypeId + '"]').iCheck('check');
			})
			
			$.each(rightNearBusinessTypeIds, function(index, rightNearBusinessTypeId) {
				$('input[data-rel="rightNearBusinessType' + rightNearBusinessTypeId + '"]').iCheck('check');
			})
			
			$('input[type="checkbox"]').iCheck({
				checkboxClass : 'icheckbox_flat-green'
			});
			
			$('input[name="shopPolicy"],input[name="shopTag"],input[name="manageBusinessType"],input[name="shopSupporting"]').on('ifToggled', function(event) {
				$(this).trigger("validate")
			});
			
			$('input[name="transferFeeCheck"]').on('ifChecked', function() {
				$('input[name="transferFee"]').val('');
				var currentCheck = $(this).val();
				$('input[name="transferFeeCheck"]').each(function(index, node) {
					if($(node).val() != currentCheck) {
						$(node).iCheck('uncheck');
					}
				});
				$('input[name="transferFee"]').attr("disabled",true);
				$('.transferFeeSpan').text("")
			});
			$('input[name="transferFeeCheck"]').on('ifUnchecked', function() {
				$('input[name="transferFee"]').attr("disabled",false);
			});
			$('#isSale').on('ifChecked', function() {
				$('input[name="totalPrice"]').val("");
				$('input[name="averagePrice"]').val("");
				$('input[name="totalPrice"]').attr("disabled",false);
				$('input[name="averagePrice"]').attr("disabled",false);
			});
			$('#isSale').on('ifUnchecked', function() {
				$('input[name="totalPrice"]').attr("disabled",true);
				$('input[name="averagePrice"]').attr("disabled",true);
			});

			$('#isLease').on('ifChecked', function() {
				$('input[name="monthlyRent"]').val("");
				$('input[name="dailyRent"]').val("");
				$('input[name="monthlyRent"]').attr("disabled",false);
				$('input[name="dailyRent"]').attr("disabled",false);
			});
			$('#isLease').on('ifUnchecked', function() {
				$('input[name="monthlyRent"]').attr("disabled",true);
				$('input[name="dailyRent"]').attr("disabled",true);
			});
			
			$('#isTransfer').on('ifChecked', function() {
				$('input[name="transferFeeCheck"]').attr("disabled",false);
				$('input[name="transferFee"]').attr("disabled",false);
			});
			$('#isTransfer').on('ifUnchecked', function() {
				$('input[name="transferFee"]').val("");
				$('.transferFeeSpan').text("");
				$('input[name="transferFeeCheck"]').iCheck('uncheck');
				$('input[name="transferFeeCheck"]').attr("disabled",true);
				$('input[name="transferFee"]').attr("disabled",true);
			});
			if($('#isSale').prop('checked')){
				$('input[name="totalPrice"]').attr("disabled",false);
				$('input[name="averagePrice"]').attr("disabled",false);
			}
			if($('#isLease').prop('checked')){
				$('input[name="monthlyRent"]').attr("disabled",false);
				$('input[name="dailyRent"]').attr("disabled",false);		
			}
			
			if($('#isTransfer').prop('checked')){
				$('input[name="transferFeeCheck"]').attr("disabled",false);
				if($('.transferFeeCheck1').prop('checked')||$('.transferFeeCheck2').prop('checked')){
					$('input[name="transferFee"]').attr("disabled",true);
				}else{
					$('input[name="transferFee"]').attr("disabled",false);
				}
			}else{
				$('input[name="transferFeeCheck"]').attr("disabled",true);
				$('input[name="transferFee"]').attr("disabled",true);
			}
			
			
			
			var ue = UE.getEditor('introductionText', {
				toolbars : [ toolbars ]
			});
			
			var shop = {id: [[${entity.id}]]}
			$("#dateForm").validator({
				rules : {
					number1 : [ /^\d+(\.?\d{1})?$/, "请填写有效的数字（保留一位）" ],
					number2 : [ /^\d+(\.?\d{2})?$/, "请填写有效的数字（保留两位）" ],
					isSale : function() {
						return $('#isSale').prop('checked');
					},
					isLease : function() {
						return $('#isLease').prop('checked');
					},
					isTransfer : function() {
						if($('#isTransfer').prop('checked')){
							if($('.transferFeeCheck1').prop('checked')||$('.transferFeeCheck2').prop('checked')&&$('input[name="transferFee"]').val() ==""){
								return false;
							}else if(!$('.transferFeeCheck1').prop('checked')&&!$('.transferFeeCheck2').prop('checked')&&$('input[name="transferFee"]').val() !=""){
								return false;
							}else{
								return true;
							}
						}else{
							return false;
						}
					}
				},
				fields : {
					name : 'required;remote(/shop/checkName?id=[[${entity.id}]]);',
					sort : "integer;",
					shopPolicy : "checked(1~);",
					shopTag : "checked(1~3);",
					areaMeasure : "required;integer(+)",
					type : {
						rule : "required",
						msg : {required : "请选择商铺类型"},
					},
					totalPrice : {
						rule : "required(isSale);integer(+)",
						msg : {isSale : "请填写总售价"}
					},
					averagePrice : {
						rule : "required(isSale);integer(+)",
						msg : {isSale : "请填写单价"}
					},
					transferFee : "required(isTransfer);number1",
					province : "required;",
					city : "required;",
					area : "required;",
					yearlyRent : "integer(+)",
					monthlyRent : {
						rule : "required(isLease);integer(+)",
						msg : {isLease : "请填写月租金"}
					},
					dailyRent : {
						rule : "required(isLease);number2",
						msg : {isLease : "请填写日租金"}
					},
					phone : "mobile;",
					shopSupporting : "checked(1~);",
					manageBusinessType : "checked(1~);",
					floor : "integer",
					totalFloor : "integer(+)",
					ownerPhone : "integer(+)",
				},
				valid : function(form) {
					shop.name = $('input[name="name"]').val()
					shop.sort = $('input[name="sort"]').val()
					shop.isSale = $('input[value="isSale"]').prop('checked');
					shop.isLease = $('input[value="isLease"]').prop('checked');
					shop.isTransfer = $('input[value="isTransfer"]').prop('checked');
					var shopTags = []
					$.each($('input[name="shopTag"]:checked'), function(index, node) {
						shopTags.push({id : $(node).val()})
					})
					shop.shopTags = shopTags
					shop.followNum = $('input[name="followNum"]').val()
					shop.areaMeasure = $('input[name="areaMeasure"]').val()
					if($('select[name="type"]').val() !=""){
						shop.type = $('select[name="type"]').val()
					}
					shop.totalPrice = $('input[name="totalPrice"]').val()
					shop.averagePrice = $('input[name="averagePrice"]').val()
					shop.yearlyRent = $('input[name="yearlyRent"]').val()
					shop.monthlyRent = $('input[name="monthlyRent"]').val()
					shop.dailyRent = $('input[name="dailyRent"]').val()
					$('input[name="transferFeeCheck"]:checked').each(function(index, node) {
						shop.transferFee = $(node).val()
					});
					var transferFee = $('input[name="transferFee"]').val()
					if (transferFee !="") {
						shop.transferFee = transferFee
					}
					shop.province = $('select[name="province"]').val()
					shop.city = {}
					shop.city.id = $('select[name="city"]').val()
					shop.area = {}
					shop.area.id = $('select[name="area"]').val()
					shop.positionX = $('input[name="positionX"]').val()
					shop.positionY = $('input[name="positionY"]').val()
					shop.address = $('input[name="address"]').val()
					if($('select[name="shopStatus"]').val() != ""){
						shop.shopStatus = $('select[name="shopStatus"]').val()
					}
					shop.dueTime = $('input[name="dueTime"]').val()
					if($('select[name="publicType"]').val() != ""){
						shop.publicType = $('select[name="publicType"]').val()
					}
					shop.saleGold = $('input[name="saleGold"]').val()
					shop.saleSilver = $('input[name="saleSilver"]').val()
					shop.saleCopper = $('input[name="saleCopper"]').val()
					shop.rentGold = $('input[name="rentGold"]').val()
					shop.rentSilver = $('input[name="rentSilver"]').val()
					shop.rentCopper = $('input[name="rentCopper"]').val()
					shop.transferGold = $('input[name="transferGold"]').val()
					shop.transferSilver = $('input[name="transferSilver"]').val()
					shop.transferCopper = $('input[name="transferCopper"]').val()
					if($('input[name="phone"]').val() != ""){
						shop.phone = $('input[name="phone"]').val()
					}
					shop.orientation = $('input[name="orientation"]').val()
					var floorType = $('select[name="floorType"]').val()
					if (floorType != "") {
						shop.floorType = floorType
					}
					shop.floor = $('input[name="floor"]').val()
					shop.totalFloor = $('input[name="totalFloor"]').val()
					shop.floorHeight = $('input[name="floorHeight"]').val()
					shop.faceWidth = $('input[name="faceWidth"]').val()
					shop.depth = $('input[name="depth"]').val()
					var manage = $('select[name="manage"]').val()
					if (manage !="") {
						shop.manage = manage
					}
					var manageBusinessTypes = []
					$.each($('input[name="manageBusinessType"]:checked'), function(index, node) {
						manageBusinessTypes.push({
							id : $(node).val()
						})
					})
					shop.manageBusinessTypes = manageBusinessTypes
					var fitBusinessTypes = []
					$.each($('input[name="fitBusinessType"]:checked'), function(index, node) {
						fitBusinessTypes.push({
							id : $(node).val()
						})
					})
					shop.fitBusinessTypes = fitBusinessTypes
					var shopSupportings = []
					$.each($('input[name="shopSupporting"]:checked'), function(index, node) {
						shopSupportings.push({
							id : $(node).val()
						})
					})
					shop.shopSupportings = shopSupportings
					shop.leftNearName = $('input[name="leftNearName"]').val()
					var leftNearBusinessTypes = []
					$.each($('input[name="leftNearBusinessType"]:checked'), function(index, node) {
						leftNearBusinessTypes.push({
							id : $(node).val()
						})
					})
					shop.leftNearBusinessTypes = leftNearBusinessTypes
					shop.rightNearName = $('input[name="rightNearName"]').val()
					var rightNearBusinessTypes = []
					$.each($('input[name="rightNearBusinessType"]:checked'), function(index, node) {
						rightNearBusinessTypes.push({
							id : $(node).val()
						})
					})
					shop.rightNearBusinessTypes = rightNearBusinessTypes
					shop.imgs = $('input[name="imgs"]').val()
					shop.superiority = ue.getContent();
					if($('select[name="ownerType"]').val() != ""){
						shop.ownerType = $('select[name="ownerType"]').val()
					}
					shop.ownerName = $('input[name="ownerName"]').val()
					shop.ownerPhone = $('input[name="ownerPhone"]').val()
					shop.ownerWeChat = $('input[name="ownerWeChat"]').val()
					shop.isAuslese = $('input[name="isAuslese"]').is(":checked")
					shop.isHot = $('input[name="isHot"]').is(":checked")
			
					$.ajax({
						url : '/shop/update',
						type : "POST",
						dataType : "json",
						contentType : "application/json",
						data : JSON.stringify(shop),
						success : function(data) {
							if(data.Type == '200'){
								adminLayer.alert({
									content : '编辑成功',
									yes : function() {window.parent.location.reload();}
								});
							}else if(data.Type == '201'){
								adminLayer.alert({
									content : data.Msg
								});
							}else{
								adminLayer.alert({
									content : '编辑失败',
								});
							}
						}
					});
				}
			});
			
			$("div").on("click",".closeImg",function(){
				var src = $(this).attr("i");
				var src1 = ',' + src;
				var src2 = src + ',';
				var imgList = $('input[name="imgs"]').val();
				if (imgList.indexOf(src1) > -1) {
					var list = imgList.replace(src1, '');
				} else if (imgList.indexOf(src2) > -1) {
					var list = imgList.replace(src2, '');
				} else {
					var list = imgList.replace(src, '');
				}
				$('input[name="imgs"]').val(list);
				$(this).parent("div").remove();
			});
		})
	</script>
</body>
</html>
